#ifndef SOFTWARESTATUS_H
#define SOFTWARESTATUS_H

#include <QLabel>
#include <QHBoxLayout>
#include <QDateTime>
#include <QTimer>

class SoftwareStatus : public QWidget
{
    Q_OBJECT
public:
    SoftwareStatus(QWidget *parent = 0);

    void ready();
    void info();
    void warning();
    void error();
private:
    QLabel *light;
    QLabel *status;
    QLabel *dateTime;
    QTimer *timer;
    QHBoxLayout *hLayout;

    const QString m_red = "min-width: 10px; min-height: 10px;max-width:10px; max-height: 10px;border-radius: 5px;  border:1px solid black;background:red";

    const QString m_green = "min-width: 10px; min-height: 10px;max-width:10px; max-height: 10px;border-radius: 5px;  border:1px solid black;background:green";

    const QString m_blue = "min-width: 10px; min-height: 10px;max-width:10px; max-height: 10px;border-radius: 5px;  border:1px solid black;background:blue";

    const QString m_yellow = "min-width: 10px; min-height: 10px;max-width:10px; max-height: 10px;border-radius: 5px;  border:1px solid black;background:yellow";
public:
    enum status{Normal = 0, Info, Warning, Error};

signals:
    void signal_status_changed(int);

private slots:
    void on_status_changed(int status);

    void slot_process_time_out();
};

#endif // SOFTWARESTATUS_H
